import { IParam } from '@/core';
import { DYNADASHBOARDUIServiceBase } from './dynadashboard-ui-service-base';

/**
 * 动态数据看板UI服务
 * 基于template/src/ui-service/{{appEntities}}/{{appEntities}}-ui-service.ts.hbs生成
 *
 * @export
 * @class DYNADASHBOARDUIService
 * @extends DYNADASHBOARDUIServiceBase
 */
export class DYNADASHBOARDUIService extends DYNADASHBOARDUIServiceBase {

    /**
     * 基础UI服务实例
     * 
     * @private
     * @type { DYNADASHBOARDUIService }
     * @memberof DYNADASHBOARDUIService
     */
    private static basicUIServiceInstance: DYNADASHBOARDUIService;

    /**
     * UI服务存储Map对象
     *
     * @private
     * @type {Map<string, any>}
     * @memberof DYNADASHBOARDUIService
     */
    private static UIServiceMap: Map<string, any> = new Map();

    /**
     * Creates an instance of DYNADASHBOARDUIService.
     * @memberof DYNADASHBOARDUIService
     */
    constructor(opts?: IParam) {
        super(opts);
    }

    /**
     * 获取实例
     *
     * @static
     * @param 应用上下文
     * @return {*}  { DYNADASHBOARDUIService }
     * @memberof DYNADASHBOARDUIService
     */
    static getInstance(opts?: IParam): DYNADASHBOARDUIService {
        if (!this.basicUIServiceInstance) {
            this.basicUIServiceInstance = new DYNADASHBOARDUIService(opts);
        }
        return this.basicUIServiceInstance;
    }
}
export default DYNADASHBOARDUIService;